package net.uri;

import java.net.URI;

public class UriSplitter
{
	public static void main(String[] args)
	{
		for (int i = 0; i < args.length; i++)
		{
			try
			{
				URI u = new URI(args[i]);
				System.out.println(u);
				if(u.isOpaque())
				{
					System.out.println("ipaque");
					System.out.println(u.getScheme());
					System.out.println(u.getSchemeSpecificPart());
					System.out.println(u.getFragment());
				}else
				{
					System.out.println("hierarchical");
					System.out.println(u.getScheme());
					System.out.println(u.getUserInfo());
					System.out.println(u.getPort());
				}
				System.out.println(u.getPath());
				System.out.println(u.getQuery());
				System.out.println(u.getFragment());
			}
			catch (Exception e)
			{
			}
			
		}
	}
}
